package cn.example.demo.modules.sys.model.dto;

import cn.example.demo.common.retrieval.BaseRequest;
import cn.example.demo.common.validation.groups.Delete;
import cn.example.demo.common.validation.groups.Insert;
import cn.example.demo.common.validation.groups.Update;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 描述：【系统日志】DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysLogDto extends BaseRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "ID不能为空！", groups = {Update.class})
    private String id;

    @NotNull(message = "操作人ID不能为空！", groups = {Insert.class, Update.class})
    private Integer operatorId;

    @NotEmpty(message = "操作内容不能为空！", groups = {Insert.class, Update.class})
    private String operation;

    @NotEmpty(message = "请求方式不能为空！", groups = {Insert.class, Update.class})
    private String requestMethod;

    @NotEmpty(message = "资源路径不能为空！", groups = {Insert.class, Update.class})
    private String resourcePath;

    @NotNull(message = "状态不能为空！", groups = {Insert.class, Update.class})
    private Integer status;

    private String consumeTime;

    @NotNull(message = "操作时间不能为空！", groups = {Insert.class, Update.class})
    private Date operationTime;

    private String clientIp;

    private String detailMsg;

    private String exceptionMsg;

    private String operator;

    private Date operationTimeStart;
    private Date operationTimeEnd;

    @NotEmpty(message = "IDs不能为空集！", groups = {Delete.class})
    private List<String> ids;
}
